﻿using System;
using NUnit.Framework;
/*
namespace MockFramework.Tests
{
    [TestFixture]
    public class PropertiesFixture
    {
       [Test]
        public void SetupProperty()
        {
            // Setup a property so that it will automatically start tracking its value (also known as Stub): 
            var mock = new Mock<IFoo>();
            // start "tracking" sets/gets to this property
            //mock.SetupProperty(f => f.Name);

            // alternatively, provide a default value for the stubbed property
            mock.SetupProperty(f => f.Name, "foo");

            // Now you can do:
            IFoo foo = mock.Object;
            // Initial value was stored
            Assert.AreEqual("foo", foo.Name);
            // New value set which changes the initial value
            foo.Name = "bar";
            Assert.AreEqual("bar", foo.Name);
            // Can't setup a readonly property
            Assert.Throws<ArgumentException>(() => mock.SetupProperty(f => f.Value, 12));
            // Must use SetupGet in this case
            mock.SetupGet(f => f.Value).Returns(12);
            Assert.AreEqual(12, foo.Value);
        }
        
        public interface IFoo
        {
            string Name { get; set; }
            int Value { get; }
        }
    }
}
*/